package com.bluebench.bigul.domain.graphics;

import com.itextpdf.text.BaseColor;
import com.itextpdf.text.pdf.PdfShading;
import com.itextpdf.text.pdf.PdfWriter;

public class AxialShading extends Shading{

	private Point start;
	private Point end;	
	
	public AxialShading(Point start, Point end, BaseColor startColor, BaseColor endColor) {
		super(startColor,endColor);
		this.start = start;
		this.end = end;
	}
	
	public Point getStart() {
		return start;
	}
	public void setStart(Point start) {
		this.start = start;
	}
	public Point getEnd() {
		return end;
	}
	public void setEnd(Point end) {
		this.end = end;
	}
	
	@Override
	public PdfShading getItextShading(PdfWriter writer) {
		PdfShading axial = PdfShading.simpleAxial(writer, start.getX(), start.getY(), end.getX(),
                end.getY(), getStartColor(), getEndColor());
		return axial;
	}
	
	
}
